﻿<div class="art-block">
    <div class="art-block-tl"></div>
    <div class="art-block-tr"></div>
    <div class="art-block-bl"></div>
    <div class="art-block-br"></div>
    <div class="art-block-tc"></div>
    <div class="art-block-bc"></div>
    <div class="art-block-cl"></div>
    <div class="art-block-cr"></div>
    <div class="art-block-cc"></div>
    <div class="art-block-body">

<div class="art-blockheader">
    <div class="l"></div>
    <div class="r"></div>
    @if (Session["User"] != null)
    {
        <h3 class="t">Chào mừng</h3>
    }
    else
    {
        <h3 class="t">Đăng nhập</h3>
    }
</div>

<div class="art-blockcontent">
    <div class="art-blockcontent-body">
    @if (TempData["Login"] != null)
    {
        switch (TempData["Login"].ToString())
         {
            case "false":
                  <script>
                      alert("Đăng nhập thất bại");
                  </script>
                 break;
            case "true":
                 <script>
                     alert("Đăng nhập thành công");
                 </script>
                 break;
            case "register":
                 <script>
                     alert("Chúc mừng bạn đã đăng ký thành công");
                 </script>
                 break;
            case "exit":
                 <script>
                     alert("Thoát thành công");
                 </script>
                 break;
            case "update":
                 <script>
                     alert("Cập nhật thành công");
                 </script>
                 break;                 
            default:
                 break;
         }
    } 

    @if (Session["User"] != null)
    {
        <div>
            @Session["User"]
            <br />
            
               <span class="art-button-wrapper">
          	<span class="art-button-l"> </span>
          	<span class="art-button-r"> </span>
          	<input class="art-button" type="button" value="Thay đổi thông tin" onclick="parent.location='@Url.Action("Update","Login")'" />            
          </span>
           
               <span class="art-button-wrapper">
          	<span class="art-button-l"> </span>
          	<span class="art-button-r"> </span>
          	<input class="art-button" type="button" value="Thoát" onclick="parent.location='@Url.Action("Exit","Login")'" />
          </span>
        </div>    
    }
    else
    {
        using (Html.BeginForm("LoginForm", "Login"))
        {
                  <div>
                       Tài khoản : 
                        <input type="text" value="" name="username" id="username" style="width: 95%;" />
                      <br />
                      Mật khẩu :  
                        <input type="password" value="" name="password" id="password" style="width: 95%;" />
                      <br />
               <span class="art-button-wrapper">
          	<span class="art-button-l"> </span>
          	<span class="art-button-r"> </span>
          	<input class="art-button" type="submit" value="Đăng nhập" />
          </span>          
               <span class="art-button-wrapper">
          	<span class="art-button-l"> </span>
          	<span class="art-button-r"> </span>
          	<input class="art-button" type="button" value="Đăng ký" onclick="parent.location='@Url.Action("Register","Login")'" />
          </span>
        </div>
        }
    }
		<div class="cleared"></div>
    </div>
</div>


		<div class="cleared"></div>
    </div>
</div>

